# Contributor: Taner Tas <taner76@gmail.com>
# Maintainer: Taner Tas <taner76@gmail.com>
pkgname=portmidi
pkgver=2.0.4
pkgrel=0
pkgdesc="PortMidi is a platform independent library for MIDI input/output."
url="https://portmedia.sourceforge.net/"
arch="all"
license="MIT"
makedepends="cmake alsa-lib-dev samurai"
subpackages="$pkgname-dev"
options="!check" # no testsuite
source="$pkgname-$pkgver.tar.gz::https://github.com/PortMidi/portmidi/archive/refs/tags/v$pkgver.tar.gz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=/usr/lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
d9f22d161e1dd9a4bde1971bb2b6e5352da51545f4fe5ecad11c55e7a535f0d88efce18d1c8fd91e93b70a7926150f86a0f53972ad92370e86556a8dd72dc194  portmidi-2.0.4.tar.gz
"
